import 'package:json_annotation/json_annotation.dart';

part 'measuring_stats.g.dart';

/*
class MeasuringStats with ChangeNotifier {
  final int _total = 0; // 总人数
  int _measured = 0; // 已量体
  int _alteration = 0; // 已套体
  int _repairs = 0; // 返修

  int get total => _total;

  int get measured => _measured;

  void increaseMeasured() {
    _measured++;
    notifyListeners();
  }

  int get alteration => _alteration;

  void increaseAlteration() {
    _alteration++;
    notifyListeners();
  }

  int get repairs => _repairs;

  void increaseRepairs() {
    _repairs++;
    notifyListeners();
  }
}
 */
@JsonSerializable()
class MeasuringStats {
  MeasuringStats();

  int total = 0; // 总人数
  int measured = 0; // 已量体
  int alteration = 0; // 已套体
  int repairs = 0; // 返修

  factory MeasuringStats.fromJson(Map<String, dynamic> json) => _$MeasuringStatsFromJson(json);

  Map<String, dynamic> toJson() => _$MeasuringStatsToJson(this);
}
